﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HonerList.aspx.cs" Inherits="School.SystemManage.WebPages.Ads.HonerList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="../../css/right.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function deleteConfirm() {
            return confirm("确定要删除吗？");
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="container">
        <div class="title_bg">
            <div class="floatLeft title_text_div">广告管理 > 底部轮播图</div> 
            <ul class="floatRight">
                <%--<li><input id="chk_Total" type="checkbox" class="floatLeft" onclick="CheckAll(this,false);" /><span class="checkAll floatLeft">全选</span><div class="clear"></div></li>
                <li class="delete"><asp:LinkButton ID="lbtnDelete" runat="server" 
                        OnClientClick="return HasCheckedRow();" onclick="lbtnDelete_Click">删除</asp:LinkButton></li>--%>
            </ul>
            <div class="clear"></div>
        </div>
        <div>
            <asp:ListView ID="lvAds" runat="server" ItemPlaceholderID="phItem" 
                DataKeyNames="pid" onitemcanceling="lvAds_ItemCanceling" 
                onitemdeleting="lvAds_ItemDeleting" onitemediting="lvAds_ItemEditing" 
                onitemupdating="lvAds_ItemUpdating">
                <EmptyDataTemplate>没有数据</EmptyDataTemplate>
                <LayoutTemplate>
                    <table cellpadding="0" class="dataTable">
                        <tr>
                            <th>图片</th>
                            <th>url</th>
                            <th>上传时间</th>
                            <th>操作</th>
                        </tr>
                        <asp:PlaceHolder ID="phItem" runat="server"></asp:PlaceHolder>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td><img src='<%#Eval("ImgPath") %>' height="50" width="100" /></td>
                        <td><%#Eval("Url") %></td>
                        <td><%#Eval("UploadTime") %></td>
                        <td>
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit">编辑</asp:LinkButton>
                            <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Delete" OnClientClick="return deleteConfirm();">删除</asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
                <EditItemTemplate>
                    <tr>
                        <td><asp:FileUpload ID="fileUpload" runat="server" /></td>
                        <td><asp:TextBox ID="txbUrl" runat="server" Text='<%#Eval("Url") %>'></asp:TextBox></td>
                        <td><%#Eval("UploadTime") %></td>
                        <td>
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Update">确定</asp:LinkButton>
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Cancel">取消</asp:LinkButton>
                        </td>
                    </tr>
                </EditItemTemplate>
            </asp:ListView>
            <asp:Label ID="lblMsg" runat="server" Text="" CssClass="red"></asp:Label>           
        </div>
        <div>
            <table class="dataTable" id="addTable" runat="server">
                <tr>
                    <th colspan="2">新增轮播图</th>
                </tr>
                <tr>
                    <td class="td1">图片：</td>
                    <td class="td2"><asp:FileUpload ID="addUpload" runat="server"  Width="400"/></td>
                </tr>
                <tr>
                    <td class="td1">Url：</td>
                    <td class="td2"><asp:TextBox ID="txbAddUrl" runat="server" Width="400"></asp:TextBox></td>
                </tr>
                <tr>
                    <td colspan="2"><asp:Button ID="btnSubmit" runat="server" Text="提交" 
                            onclick="btnSubmit_Click" /></td>
                </tr>
            </table>
        </div> 
    </div>
    </form>
</body>
</html>
